/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;

/**
 *
 * @author Thiago
 */
public class Camera implements Serializable{

    private static Camera instance;

    // Atributos da camera
    private int dp = 50;        //Distancia de projecao

    private double vx = 0.0;
    private double vy = 0.0;
    private double vz = 0.0;

    private double px = 0.0;
    private double py = 0.0;
    private double pz = 0.0;

    private double vxISO = 100.0;
    private double vyISO = 0.0;
    private double vzISO = 100.0;
    private double pxISO = 0.0;
    private double pyISO = 0.0;
    private double pzISO = 0.0;
    
    // largura altura do objeto
    double largura, altura;
    
    double yx = 0;
    double yy = 1;
    double yz = 0;
    
    // angulo para fazer a rotação da camera
    int ang = 0;
    
    // variaveis do sombreamento
    double iLa = 70;
    double lX = 300;
    double lY = 200;
    double lZ = 250;
    double iL = 130;
    double ka = 0.8;
    double kd = 0.6;
    double ks = 0.9;
    double n = 4;

    public static synchronized Camera getInstance() {
        if (Camera.instance == null) {
            instance = new Camera();
        }
        return instance;
    }

    private Camera() {

        //Atributos para a visao Perspectiva        
        //Coordenada de camera
        this.vx = 0.0;
        this.vy = 0.0;
        this.vz = 0.0;
        //Coordenada do ponto focal
        this.px = 0.0;
        this.py = 0.0;
        this.pz = 0.0;

        //Atributos para a visao Isometrica
        //Coordenada de camera
        this.vxISO = 100.0;
        this.vyISO = 0.0;
        this.vzISO = 100.0;
        //Coordenada do ponto focal
        this.pxISO = 0.0;
        this.pyISO = 0.0;
        this.pzISO = 0.0;
    }

    //Gerenciamento da Isometrica
    public void incVx(double value) {
        this.vx += value;
    }

    public void incVy(double value) {
        this.vy += value;
    }

    public void incVz(double value) {
        this.vz += value;
    }

    public void incPx(double value) {
        this.px += value;
    }

    public void incPy(double value) {
        this.py += value;
    }

    public void incPz(double value) {
        this.pz += value;
    }

    //Gerenciamento da Izometrica
    public void incVxISO(double value) {
        this.vxISO += value;
    }

    public void incVyISO(double value) {
        this.vyISO += value;
    }

    public void incVzISO(double value) {
        this.vzISO += value;
    }

    public void incPxISO(double value) {
        this.pxISO += value;
    }

    public void incPyISO(double value) {
        this.pyISO += value;
    }

    public void incPzISO(double value) {
        this.pzISO += value;
    }

    public void incDp(int value) {
        this.dp += value;
    }
    
    public void incYx(int value){
        this.yx += value;
    }
    
    public void incYy(int value){
        this.yy += value;
    }
    
    public void incYz(int value){
        this.yz += value;
    }

    public double getVx() {
        return vx;
    }

    public double getVy() {
        return vy;
    }

    public double getVz() {
        return vz;
    }

    public double getPx() {
        return px;
    }

    public double getPy() {
        return py;
    }

    public double getPz() {
        return pz;
    }

    public double getVxISO() {
        return vxISO;
    }

    public double getVyISO() {
        return vyISO;
    }

    public double getVzISO() {
        return vzISO;
    }

    public double getPxISO() {
        return pxISO;
    }

    public double getPyISO() {
        return pyISO;
    }

    public double getPzISO() {
        return pzISO;
    }

    public int getDp() {
        return dp;
    }

    public void setDp(int dp) {
        this.dp = dp;
    }

    public void setVx(double vx) {
        this.vx = vx;
    }

    public void setVy(double vy) {
        this.vy = vy;
    }

    public void setVz(double vz) {
        this.vz = vz;
    }

    public void setPx(double px) {
        this.px = px;
    }

    public void setPy(double py) {
        this.py = py;
    }

    public void setPz(double pz) {
        this.pz = pz;
    }

    public void setVxISO(double vxISO) {
        this.vxISO = vxISO;
    }

    public void setVyISO(double vyISO) {
        this.vyISO = vyISO;
    }

    public void setVzISO(double vzISO) {
        this.vzISO = vzISO;
    }

    public void setPxISO(double pxISO) {
        this.pxISO = pxISO;
    }

    public void setPyISO(double pyISO) {
        this.pyISO = pyISO;
    }

    public void setPzISO(double pzISO) {
        this.pzISO = pzISO;
    }

    public void setLargura(double largura) {
        this.largura = largura;
    }

    public void setAltura(double altura) {
        this.altura = altura;
    }

    public double getLargura() {
        return largura;
    }

    public double getAltura() {
        return altura;
    }

    public double getYx() {
        return yx;
    }

    public double getYy() {
        return yy;
    }

    public double getYz() {
        return yz;
    }

    public void setYx(double yx) {
        this.yx = yx;
    }

    public void setYy(double yy) {
        this.yy = yy;
    }

    public void setYz(double yz) {
        this.yz = yz;
    }

    public int getAng() {
        return ang;
    }

    public void setAng(int ang) {
        this.ang = ang;
    }

    public double getiLa() {
        return iLa;
    }

    public void setiLa(double iLa) {
        this.iLa = iLa;
    }

    public double getlX() {
        return lX;
    }

    public void setlX(double lX) {
        this.lX = lX;
    }

    public double getlY() {
        return lY;
    }

    public void setlY(double lY) {
        this.lY = lY;
    }

    public double getlZ() {
        return lZ;
    }

    public void setlZ(double lZ) {
        this.lZ = lZ;
    }

    public double getiL() {
        return iL;
    }

    public void setiL(double iL) {
        this.iL = iL;
    }

    public double getKa() {
        return ka;
    }

    public void setKa(double ka) {
        this.ka = ka;
    }

    public double getKd() {
        return kd;
    }

    public void setKd(double kd) {
        this.kd = kd;
    }

    public double getKs() {
        return ks;
    }

    public void setKs(double ks) {
        this.ks = ks;
    }

    public double getN() {
        return n;
    }

    public void setN(double n) {
        this.n = n;
    }
    
    
    
}
